SUBROUTINE dot_ab(a,b,ab)
! Copyright (C) 2010 W. Wang
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

IMPLICIT NONE
REAL(8),INTENT(IN) :: a(3),b(3)
REAL(8),INTENT(OUT) :: ab
INTEGER :: i
DO i=1,3
ab=a(i)*b(i)+ab
END DO
RETURN
END SUBROUTINE

